import { mapState } from 'vuex';

export default {
    data () {
        return {
            pages: [
                { txt: '收藏', icon: 'star', color: 'red' },
                { txt: '历史', icon: 'underway', color: 'green' },
                { txt: '作品', icon: 'column', color: 'yellow' },
            ],
            features: [
                { title: '消息通知', path: '/message' },
                { title: 'b', path: '/' },
                { title: 'c', path: '/' },
                { title: 'd', path: '/' },
                { title: '设置', path: '/settings' },
            ],
        };
    },
    computed: {
        ...mapState('mine', [
            'profile',
            'info',
        ]),
        infoList () {
            return [
                { txt: '动态', num: this.info.art_count },
                { txt: '关注', num: this.info.follow_count },
                { txt: '粉丝', num: this.info.fans_count },
            ];
        },
    },
    methods: {
        signOut () {
            // 清除token
            localStorage.removeItem('TOKEN');
            // 跳页面
            this.$router.push('/login');
        },
    },
}
